/**
 * 
 */
package com.example.radioclub.music.interfaces;

import org.springframework.web.client.RestTemplate;

/**
 * This interface provides many things you need about doing Rest-related task
 * in Music-something class or Activity.
 * 
 * @author wizard
 *
 */
public interface IRestMusic {
	/**
	 * Should be called whenever you finish downloading certificate
	 * 
	 * @param result something you want to pass from your task
	 */
	public void onCertificateDownloadFinished(String result);
	/**
	 * Should be called whenever you finish downloading client(or app).
	 * 
	 * @param result something you want to pass in Object array.
	 * 			first index contains a template with certain cookie.
	 * 			second index contains a channelCd required for streaming.
	 * 			you may define another index(s) as long as you need them.
	 */
	public void onClientAuthenticationFinished(Object[] result);
	/**
	 * Should be called whenever you finish something in general like downloading JSON.
	 * 
	 * @param object something in general so you have to do something about this param.
	 */
	public void onDownloadFinished(Object object);
	/**
	 * Should be called whenever you finished downloading genres from the cloud.
	 * 
	 * @param result genres in JSON format.
	 */
	public void onGenreDownloadFinished(String result);
	/**
	 * Should be called whenever you finish downloading musics.
	 * 
	 * @param result musics in JSON format.
	 */
	public void onMusicFinished(String result);
	/**
	 * Should be called whenever you finish downloading searching results.
	 * 
	 * @param result searching result in JSON format.
	 */
	public void onSearchingFinished(String result);
	/**
	 * Should be called whenever you finish downloading authorization from Radio.
	 * 
	 * @param result a template of which you can use this to play some certain
	 * 			contents you won't be able to play without this template.
	 */
	public void onServerAuthFinished(RestTemplate result);
	/**
	 * Should be called whenever you finish downloading user details from MelOn server.
	 * 
	 * @param result user details from Radio server in JSON format.
	 */
	public void onUserDetailDownloadFinished(String result);
}
